{|if $message == 'error'|}
Error! <br />
{|/if|}
{|if $message == 'ok'|}
<script type="text/javascript">
    document.location = "/controlpanel/uploader/"
</script>
{|/if|}
{|if $message != 'ok'|}
<script type="text/javascript">
  function copyName(){
    // document.getElementById("aliass").value=document.getElementById("fileId").value;
      //  document.getElementById('aliass').value="lala";

      document.getElementById("aliass").href = document.getElementById("fileId").value;
  var theexa=document.getElementById("aliass").href.replace("file:///","");
  document.getElementById("aliass").href.replace("file:///","");
  if (theexa==""){ alert ("File name is empty")}
      
  }
</script>
<form method="post" enctype="multipart/form-data">
  
   <input type="file" id="fileId" name="file" onChange="copyName()"/><br />
   <label > Псевдонім для файлу</label>
   <input type="text" id="aliass" style="width: 300px;" name="alias" value="{|$control_alias|}" /><br />
      
   <input type="submit" class="button" name="upload" value="Upload" />
   
</form>
{|/if|}